package com.easychat.utils;

import com.easychat.dto.TokenUserInfoDto;
import com.easychat.entity.UserInfo;

/**
 * @author 10 2024/10/8
 */
public class LoginUserHolder {
     public static ThreadLocal<TokenUserInfoDto> threadLocal = new ThreadLocal<>();

     public static void set(TokenUserInfoDto tokenUserInfoDto){
          threadLocal.set(tokenUserInfoDto);
     }
     public static TokenUserInfoDto get(){
          return threadLocal.get();
     }
     public static void clear(){
          threadLocal.remove();
     }

}
